package com.bdqn.design;

import com.bdqn.design.proxy.Buyer;
import com.bdqn.design.proxy.RealBuyer;
import com.bdqn.design.proxy.jdk.IntermediaryJDKProxyFactory;

/**
 * Test06ProxyDynamicJDK 动态代理（使用JDK实现动态代理）
 *
 * @author LILIBO
 * @since 2023-10-10
 */
public class Test05ProxyDynamicJDK {

    public static void main(String[] args) {
        // 使用JDK实现动态代理
        Buyer buyer = IntermediaryJDKProxyFactory.create(new RealBuyer());
        String result = buyer.havealook();
        System.out.println("[返回结果]：" + result);

    }

}
